﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.Regions;
using VS.MainModule.Models;

namespace VS.MainModule.Views
{
    public partial class MainView : UserControl
    {
        public MainView(MainViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;
        }

        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            XamlContent menutItem = ((sender as FrameworkElement).DataContext) as XamlContent;
            MainViewModel vm = DataContext as MainViewModel;
            vm.OpenArticle.Execute(menutItem);
        }
    }
}
